package tmproject.hlhj.fhp.cartrans.utils

import android.annotation.SuppressLint
import android.content.Context
import android.view.View
import tmproject.hlhj.fhp.cartrans.customVIews.LoadingDialog
import java.lang.ref.WeakReference

/**
 * Created by Administrator on 2018/8/23/023.
 */
object LoadingUtil {
    @SuppressLint("StaticFieldLeak")
    private var loadingDialog:LoadingDialog?=null
    fun showLoading(c:Context){
        if (null== loadingDialog){
            loadingDialog= LoadingDialog(c)
        }
        loadingDialog?.show()
    }
    fun hideLoading(){
        if (null!= loadingDialog){
            loadingDialog?.dismiss()
            loadingDialog=null
        }
    }
}